public class Test {
    //打印10！累加的结果(1!+2!+3!....+10!)
    public static void main(String[] args) {
        int x=1;
        int ret = 0;
        while(x<=10){
            int a=1;
            int sum=1;
            while (a <= x) {
                sum *= a;
                a++;
            }
            ret += sum;
            x++;
        }
        System.out.println(ret);


    }
    //打印1`10的和的的数字
    /*public static void main1(String[] args) {
        int a=1;
        int sum=0;
        while(a<=10){
            sum+=a;
            a++;
            System.out.println(sum);
        }
    }*/
}
